home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OCEMail.p < prev    next >
Encoding:
Text File  |  1998-02-12  |  49.0 KB  |  1,680 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OCEMail.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.1
  8.  
  9.      Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OCEMail;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OCEMAIL__}
  28. {$SETC __OCEMAIL__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OCEMailIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __FILES__}
  38. {$I Files.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __TEXTEDIT__}
  41. {$I TextEdit.p}
  42. {$ENDC}
  43.  
  44. {$IFC UNDEFINED __DIGITALSIGNATURE__}
  45. {$I DigitalSignature.p}
  46. {$ENDC}
  47. {$IFC UNDEFINED __OCE__}
  48. {$I OCE.p}
  49. {$ENDC}
  50. {$IFC UNDEFINED __OCEAUTHDIR__}
  51. {$I OCEAuthDir.p}
  52. {$ENDC}
  53. {$IFC UNDEFINED __OCEMESSAGING__}
  54. {$I OCEMessaging.p}
  55. {$ENDC}
  56.  
  57.  
  58. {$PUSH}
  59. {$ALIGN MAC68K}
  60. {$LibExport+}
  61.  
  62. {************************************************************************************}
  63. { Common Definitions }
  64. {************************************************************************************}
  65.  
  66. { reference to a new or open letter or message }
  67.  
  68. TYPE
  69.     MailMsgRef                            = LONGINT;
  70. { reference to an open msam queue }
  71.     MSAMQueueRef                        = LONGINT;
  72. { identifies slots managed by a PMSAM }
  73.     MSAMSlotID                            = UInt16;
  74. { reference to an active mailbox }
  75.     MailboxRef                            = LONGINT;
  76. { identifies slots within a mailbox }
  77.     MailSlotID                            = UInt16;
  78. { identifies a letter in a mailbox }
  79.     MailSeqNumPtr = ^MailSeqNum;
  80.     MailSeqNum = RECORD
  81.         slotID:                    MailSlotID;
  82.         seqNum:                    LONGINT;
  83.     END;
  84.  
  85. { A MailBuffer is used to describe a buffer used for an IO operation.
  86. The location of the buffer is pointed to by 'buffer'. 
  87. When reading, the size of the buffer is 'bufferSize' 
  88. and the size of data actually read is 'dataSize'.
  89. When writing, the size of data to be written is 'bufferSize' 
  90. and the size of data actually written is 'dataSize'.
  91. }
  92.     MailBufferPtr = ^MailBuffer;
  93.     MailBuffer = RECORD
  94.         bufferSize:                LONGINT;
  95.         buffer:                    Ptr;
  96.         dataSize:                LONGINT;
  97.     END;
  98.  
  99. { A MailReply is used to describe a commonly used reply buffer format.
  100. It contains a count of tuples followed by an array of tuples.
  101. The format of the tuple itself depends on each particular call.
  102. }
  103.     MailReplyPtr = ^MailReply;
  104.     MailReply = RECORD
  105.         tupleCount:                UInt16;
  106.                                                                         {  tuple[tupleCount]  }
  107.     END;
  108.  
  109. { Shared Memory Communication Area used when Mail Manager sends 
  110. High Level Events to a PMSAM. 
  111. }
  112.     SMCAPtr = ^SMCA;
  113.     SMCA = RECORD
  114.         smcaLength:                UInt16;                                    {  includes size of smcaLength field  }
  115.         result:                    OSErr;
  116.         userBytes:                LONGINT;
  117.         CASE INTEGER OF
  118.         0: (
  119.             slotCID:            CreationID;                                {  for create/modify/delete slot calls  }
  120.             );
  121.         1: (
  122.             msgHint:            LONGINT;                                {  for kMailEPPCMsgOpened  }
  123.             );
  124.     END;
  125.  
  126. {************************************************************************************}
  127. { Value of creator and types fields for messages and blocks defined by MailManager }
  128.  
  129. CONST
  130.     kMailAppleMailCreator        = 'apml';                        {  message and letter block creator  }
  131.     kMailLtrMsgType                = 'lttr';                        {  message type of letters, reports  }
  132.     kMailLtrHdrType                = 'lthd';                        {  contains letter header  }
  133.     kMailContentType            = 'body';                        {  contains content of letter  }
  134.     kMailEnclosureListType        = 'elst';                        {  contains list of enclosures  }
  135.     kMailEnclosureDesktopType    = 'edsk';                        {  contains desktop mgr info for enclosures  }
  136.     kMailEnclosureFileType        = 'asgl';                        {  contains a file enclosure, format is defined by AppleSingle  }
  137.     kMailImageBodyType            = 'imag';                        {  contains image of letter  }
  138.     kMailMSAMType                = 'gwyi';                        {  contains msam specific information  }
  139.     kMailTunnelLtrType            = 'tunl';                        {  used to read a tunnelled message  }
  140.     kMailHopInfoType            = 'hopi';                        {  used to read hopInfo for a tunnelled message  }
  141.     kMailReportType                = 'rpti';                        {  contains report info  }
  142.     kMailFamily                    = 'mail';                        {  Defines family of "mail" msgs: content, header, etc  }
  143.     kMailFamilyFile                = 'file';                        {  Defines family of "direct display" msgs  }
  144.  
  145. {    
  146. kMailImageBodyType:
  147.     format is struct TPfPgDir - in Printing.h
  148.     *    struct TPfPgDir (
  149.     *        short    pageCount;        - number of pages in the image.
  150.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  151.     *                                - to image of page n.
  152.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  153.  
  154. kMailReportType:
  155. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  156. This block has a header, IPMReportBlockHeader,
  157. followed by an array of elements, each of type IPMRecipientReport
  158.  
  159. Various families used by mail or related msgs
  160. }
  161.  
  162.  
  163. {************************************************************************************}
  164.  
  165. TYPE
  166.     MailAttributeID                        = UInt16;
  167. { Values of MailAttributeID }
  168. { Message store attributes - stored in the catalog }
  169. { Will always be present in a letter and have fixed sizes }
  170.  
  171. CONST
  172.     kMailLetterFlagsBit            = 1;                            {  MailLetterFlags  }
  173.                                                                 {  Letter attributes - stored in the letter will always be present in a letter and have fixed sizes  }
  174.     kMailIndicationsBit            = 3;                            {  MailIndications  }
  175.     kMailMsgTypeBit                = 4;                            {  OCECreatorType  }
  176.     kMailLetterIDBit            = 5;                            {  MailLetterID  }
  177.     kMailSendTimeStampBit        = 6;                            {  MailTime  }
  178.     kMailNestingLevelBit        = 7;                            {  MailNestingLevel  }
  179.     kMailMsgFamilyBit            = 8;                            {  OSType  }
  180.                                                                 {  Letter attributes - stored in the letter may be present in a letter and have fixed sizes  }
  181.     kMailReplyIDBit                = 9;                            {  MailLetterID  }
  182.     kMailConversationIDBit        = 10;                            {  MailLetterID  }
  183.                                                                 {  Letter attributes - stored in the letter may be present in a letter and have variable length sizes  }
  184.     kMailSubjectBit                = 11;                            {  RString  }
  185.     kMailFromBit                = 12;                            {  MailRecipient  }
  186.     kMailToBit                    = 13;                            {  MailRecipient  }
  187.     kMailCcBit                    = 14;                            {  MailRecipient  }
  188.     kMailBccBit                    = 15;                            {  MailRecipient  }
  189.  
  190.  
  191. TYPE
  192.     MailAttributeMask                    = UInt32;
  193. { Values of MailAttributeMask }
  194.  
  195. CONST
  196.     kMailLetterFlagsMask        = $00000001;
  197.     kMailIndicationsMask        = $00000004;
  198.     kMailMsgTypeMask            = $00000008;
  199.     kMailLetterIDMask            = $00000010;
  200.     kMailSendTimeStampMask        = $00000020;
  201.     kMailNestingLevelMask        = $00000040;
  202.     kMailMsgFamilyMask            = $00000080;
  203.     kMailReplyIDMask            = $00000100;
  204.     kMailConversationIDMask        = $00000200;
  205.     kMailSubjectMask            = $00000400;
  206.     kMailFromMask                = $00000800;
  207.     kMailToMask                    = $00001000;
  208.     kMailCcMask                    = $00002000;
  209.     kMailBccMask                = $00004000;
  210.  
  211.  
  212. TYPE
  213.     MailAttributeBitmap                    = UInt32;
  214. {************************************************************************************}
  215.     MailLetterSystemFlags                = UInt16;
  216. { Values of MailLetterSystemFlags }
  217. { letter is available locally (either by nature or via cache) }
  218.  
  219. CONST
  220.     kMailIsLocalBit                = 2;
  221.  
  222.     kMailIsLocalMask            = $00000004;
  223.  
  224.  
  225. TYPE
  226.     MailLetterUserFlags                    = UInt16;
  227.  
  228. CONST
  229.     kMailReadBit                = 0;                            {  this letter has been opened  }
  230.     kMailDontArchiveBit            = 1;                            {  this letter is not to be archived either because it has already been archived or it should not be archived.  }
  231.     kMailInTrashBit                = 2;                            {  this letter is in trash  }
  232.  
  233. { Values of MailLetterUserFlags }
  234.     kMailReadMask                = $00000001;
  235.     kMailDontArchiveMask        = $00000002;
  236.     kMailInTrashMask            = $00000004;
  237.  
  238.  
  239. TYPE
  240.     MailLetterFlagsPtr = ^MailLetterFlags;
  241.     MailLetterFlags = RECORD
  242.         sysFlags:                MailLetterSystemFlags;
  243.         userFlags:                MailLetterUserFlags;
  244.     END;
  245.  
  246.     MailMaskedLetterFlagsPtr = ^MailMaskedLetterFlags;
  247.     MailMaskedLetterFlags = RECORD
  248.         flagMask:                MailLetterFlags;                        {  flags that are to be set  }
  249.         flagValues:                MailLetterFlags;                        {  and their values  }
  250.     END;
  251.  
  252.  
  253. CONST
  254.     kMailOriginalInReportBit    = 1;
  255.     kMailNonReceiptReportsBit    = 3;
  256.     kMailReceiptReportsBit        = 4;
  257.     kMailForwardedBit            = 5;
  258.     kMailPriorityBit            = 6;
  259.     kMailIsReportWithOriginalBit = 8;
  260.     kMailIsReportBit            = 9;
  261.     kMailHasContentBit            = 10;
  262.     kMailHasSignatureBit        = 11;
  263.     kMailAuthenticatedBit        = 12;
  264.     kMailSentBit                = 13;
  265.     kMailNativeContentBit        = 14;
  266.     kMailImageContentBit        = 15;
  267.     kMailStandardContentBit        = 16;
  268.  
  269. { Values of MailIndications }
  270.     kMailStandardContentMask    = $00008000;
  271.     kMailImageContentMask        = $00004000;
  272.     kMailNativeContentMask        = $00002000;
  273.     kMailSentMask                = $00001000;
  274.     kMailAuthenticatedMask        = $00000800;
  275.     kMailHasSignatureMask        = $00000400;
  276.     kMailHasContentMask            = $00000200;
  277.     kMailIsReportMask            = $00000100;
  278.     kMailIsReportWithOriginalMask = $00000080;
  279.     kMailPriorityMask            = $00000060;
  280.     kMailForwardedMask            = $00000010;
  281.     kMailReceiptReportsMask        = $00000008;
  282.     kMailNonReceiptReportsMask    = $00000004;
  283.     kMailOriginalInReportMask    = $00000003;
  284.  
  285.  
  286. TYPE
  287.     MailIndications                        = UInt32;
  288. { values of the field originalInReport in MailIndications }
  289.  
  290. CONST
  291.     kMailNoOriginal                = 0;                            {  do not enclose original in reports  }
  292.     kMailEncloseOnNonReceipt    = 3;                            {  enclose original in non-delivery reports  }
  293.  
  294.  
  295. TYPE
  296.     MailLetterID                        = IPMMsgID;
  297.     MailLetterIDPtr                     = ^MailLetterID;
  298.     MailTimePtr = ^MailTime;
  299.     MailTime = RECORD
  300.         time:                    UTCTime;                                {  current UTC(GMT) time  }
  301.         offset:                    UTCOffset;                                {  offset from GMT  }
  302.     END;
  303.  
  304. { innermost letter has nestingLevel 0 }
  305.     MailNestingLevel                    = UInt16;
  306.     MailRecipient                        = OCERecipient;
  307.     MailRecipientPtr                     = ^MailRecipient;
  308. {************************************************************************************}
  309.  
  310. CONST
  311.     kMailTextSegmentBit            = 0;
  312.     kMailPictSegmentBit            = 1;
  313.     kMailSoundSegmentBit        = 2;
  314.     kMailStyledTextSegmentBit    = 3;
  315.     kMailMovieSegmentBit        = 4;
  316.  
  317.  
  318. TYPE
  319.     MailSegmentMask                        = UInt16;
  320. { Values of MailSegmentMask }
  321.  
  322. CONST
  323.     kMailTextSegmentMask        = $00000001;
  324.     kMailPictSegmentMask        = $00000002;
  325.     kMailSoundSegmentMask        = $00000004;
  326.     kMailStyledTextSegmentMask    = $00000008;
  327.     kMailMovieSegmentMask        = $00000010;
  328.  
  329.  
  330. TYPE
  331.     MailSegmentType                        = UInt16;
  332. { Values of MailSegmentType }
  333.  
  334. CONST
  335.     kMailInvalidSegmentType        = 0;
  336.     kMailTextSegmentType        = 1;
  337.     kMailPictSegmentType        = 2;
  338.     kMailSoundSegmentType        = 3;
  339.     kMailStyledTextSegmentType    = 4;
  340.     kMailMovieSegmentType        = 5;
  341.  
  342. {************************************************************************************}
  343.     kMailErrorLogEntryVersion    = $0101;
  344.     kMailMSAMErrorStringListID    = 128;                            {  These 'STR#' resources should be  }
  345.     kMailMSAMActionStringListID    = 129;                            {  in the PMSAM resource fork  }
  346.  
  347.  
  348. TYPE
  349.     MailLogErrorType                    = UInt16;
  350. { Values of MailLogErrorType }
  351.  
  352. CONST
  353.     kMailELECorrectable            = 0;
  354.     kMailELEError                = 1;
  355.     kMailELEWarning                = 2;
  356.     kMailELEInformational        = 3;
  357.  
  358.  
  359. TYPE
  360.     MailLogErrorCode                    = INTEGER;
  361. { Values of MailLogErrorCode }
  362.  
  363. CONST
  364.     kMailMSAMErrorCode            = 0;                            {  positive codes are indices into PMSAM defined strings  }
  365.     kMailMiscError                = -1;                            {  negative codes are OCE defined  }
  366.     kMailNoModem                = -2;                            {  modem required, but missing  }
  367.  
  368.  
  369. TYPE
  370.     MailErrorLogEntryInfoPtr = ^MailErrorLogEntryInfo;
  371.     MailErrorLogEntryInfo = RECORD
  372.         version:                INTEGER;
  373.         timeOccurred:            UTCTime;                                {  do not fill in  }
  374.         reportingPMSAM:            Str31;                                    {  do not fill in  }
  375.         reportingMSAMSlot:        Str31;                                    {  do not fill in  }
  376.         errorType:                MailLogErrorType;
  377.         errorCode:                MailLogErrorCode;
  378.         errorResource:            INTEGER;                                {  resources are valid if  }
  379.         actionResource:            INTEGER;                                {  errorCode = kMailMSAMErrorCode index starts from 1  }
  380.         filler:                    UInt32;
  381.         filler2:                UInt16;
  382.     END;
  383.  
  384. {************************************************************************************}
  385.     MailBlockMode                        = INTEGER;
  386. { Values of MailBlockMode }
  387.  
  388. CONST
  389.     kMailFromStart                = 1;                            {  write data from offset calculated from  }
  390.     kMailFromLEOB                = 2;                            {  start of block, end of block,  }
  391.     kMailFromMark                = 3;                            {  or from the current mark  }
  392.  
  393.  
  394. TYPE
  395.     MailEnclosureInfoPtr = ^MailEnclosureInfo;
  396.     MailEnclosureInfo = RECORD
  397.         enclosureName:            StringPtr;
  398.         catInfo:                CInfoPBPtr;
  399.         comment:                StringPtr;
  400.         icon:                    Ptr;
  401.     END;
  402.  
  403. {************************************************************************************}
  404.  
  405. CONST
  406.     kOCESetupLocationNone        = 0;                            {  disconnect state  }
  407.     kOCESetupLocationMax        = 8;                            {  maximum location value  }
  408.  
  409.  
  410. TYPE
  411.     OCESetupLocation                    = CHAR;
  412. { location state is a bitmask, 0x1=>1st location active, 
  413.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  414.  }
  415.     MailLocationFlags                    = UInt8;
  416.     MailLocationInfoPtr = ^MailLocationInfo;
  417.     MailLocationInfo = RECORD
  418.         location:                SInt8;
  419.         active:                    SInt8;
  420.     END;
  421.  
  422. {************************************************************************************}
  423. { Definitions for Personal MSAMs }
  424. {************************************************************************************}
  425.  
  426. CONST
  427.     kMailEPPCMsgVersion            = 3;
  428.  
  429.  
  430. TYPE
  431.     MailEPPCMsgPtr = ^MailEPPCMsg;
  432.     MailEPPCMsg = RECORD
  433.         version:                INTEGER;
  434.         CASE INTEGER OF
  435.         0: (
  436.             theSMCA:            SMCAPtr;                                {  for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn'  }
  437.             );
  438.         1: (
  439.             sequenceNumber:        LONGINT;                                {  for 'inqu', 'dlom'  }
  440.             );
  441.         2: (
  442.             locationInfo:        MailLocationInfo;                        {  for 'locc'  }
  443.             );
  444.     END;
  445.  
  446. { Values of OCE defined High Level Event message classes }
  447.  
  448. CONST
  449.     kMailEPPCCreateSlot            = 'crsl';
  450.     kMailEPPCModifySlot            = 'mdsl';
  451.     kMailEPPCDeleteSlot            = 'dlsl';
  452.     kMailEPPCShutDown            = 'quit';
  453.     kMailEPPCMailboxOpened        = 'mbop';
  454.     kMailEPPCMailboxClosed        = 'mbcl';
  455.     kMailEPPCMsgPending            = 'msgp';
  456.     kMailEPPCSendImmediate        = 'sndi';
  457.     kMailEPPCContinue            = 'cont';
  458.     kMailEPPCSchedule            = 'sked';
  459.     kMailEPPCAdmin                = 'admn';
  460.     kMailEPPCInQUpdate            = 'inqu';
  461.     kMailEPPCMsgOpened            = 'msgo';
  462.     kMailEPPCDeleteOutQMsg        = 'dlom';
  463.     kMailEPPCWakeup                = 'wkup';
  464.     kMailEPPCLocationChanged    = 'locc';
  465.  
  466.  
  467. TYPE
  468.     MailTimerPtr = ^MailTimer;
  469.     MailTimer = RECORD
  470.         CASE INTEGER OF
  471.         0: (
  472.             frequency:            LONGINT;                                {  how often to connect  }
  473.             );
  474.         1: (
  475.             connectTime:        LONGINT;                                {  time since midnight  }
  476.             );
  477.     END;
  478.  
  479.  
  480. CONST
  481.     kMailTimerOff                = 0;                            {  control is off  }
  482.     kMailTimerTime                = 1;                            {  specifies connect time (relative to midnight)  }
  483.     kMailTimerFrequency            = 2;                            {  specifies connect frequency  }
  484.  
  485.  
  486. TYPE
  487.     MailTimerKind                        = Byte;
  488.     MailTimersPtr = ^MailTimers;
  489.     MailTimers = RECORD
  490.         sendTimeKind:            SInt8;                                    {  either kMailTimerTime or kMailTimerFrequency  }
  491.         receiveTimeKind:        SInt8;                                    {  either kMailTimerTime or kMailTimerFrequency  }
  492.         send:                    MailTimer;
  493.         receive:                MailTimer;
  494.     END;
  495.  
  496.  
  497.     MailStandardSlotInfoAttributePtr = ^MailStandardSlotInfoAttribute;
  498.     MailStandardSlotInfoAttribute = RECORD
  499.         version:                INTEGER;
  500.         active:                    SInt8;                                    {  active if MailLocationMask(i) is set  }
  501.         padByte:                SInt8;
  502.         sendReceiveTimer:        MailTimers;
  503.     END;
  504.  
  505. {$IFC TYPED_FUNCTION_POINTERS}
  506.     MSAMIOCompletionProcPtr = PROCEDURE(VAR paramBlock: TempMSAMParam);
  507. {$ELSEC}
  508.     MSAMIOCompletionProcPtr = Register68kProcPtr;
  509. {$ENDC}
  510.  
  511.     MSAMIOCompletionUPP = UniversalProcPtr;
  512.     PMSAMGetMSAMRecordPBPtr = ^PMSAMGetMSAMRecordPB;
  513.     PMSAMGetMSAMRecordPB = RECORD
  514.         qLink:                    Ptr;
  515.         reservedH1:                LONGINT;
  516.         reservedH2:                LONGINT;
  517.         ioCompletion:            MSAMIOCompletionUPP;
  518.         ioResult:                OSErr;
  519.         saveA5:                    LONGINT;
  520.         reqCode:                INTEGER;
  521.         msamCID:                CreationID;
  522.     END;
  523.  
  524.     PMSAMOpenQueuesPBPtr = ^PMSAMOpenQueuesPB;
  525.     PMSAMOpenQueuesPB = RECORD
  526.         qLink:                    Ptr;
  527.         reservedH1:                LONGINT;
  528.         reservedH2:                LONGINT;
  529.         ioCompletion:            MSAMIOCompletionUPP;
  530.         ioResult:                OSErr;
  531.         saveA5:                    LONGINT;
  532.         reqCode:                INTEGER;
  533.         inQueueRef:                MSAMQueueRef;
  534.         outQueueRef:            MSAMQueueRef;
  535.         msamSlotID:                MSAMSlotID;
  536.         filler:                    ARRAY [0..1] OF LONGINT;
  537.     END;
  538.  
  539.     PMSAMStatus                            = UInt16;
  540. { Values of PMSAMStatus }
  541.  
  542. CONST
  543.     kPMSAMStatusPending            = 1;                            {  for inQueue and outQueue  }
  544.     kPMSAMStatusError            = 2;                            {  for inQueue and outQueue  }
  545.     kPMSAMStatusSending            = 3;                            {  for outQueue only  }
  546.     kPMSAMStatusCaching            = 4;                            {  for inQueue only  }
  547.     kPMSAMStatusSent            = 5;                            {  for outQueue only  }
  548.  
  549.  
  550. TYPE
  551.     PMSAMSetStatusPBPtr = ^PMSAMSetStatusPB;
  552.     PMSAMSetStatusPB = RECORD
  553.         qLink:                    Ptr;
  554.         reservedH1:                LONGINT;
  555.         reservedH2:                LONGINT;
  556.         ioCompletion:            MSAMIOCompletionUPP;
  557.         ioResult:                OSErr;
  558.         saveA5:                    LONGINT;
  559.         reqCode:                INTEGER;
  560.         queueRef:                MSAMQueueRef;
  561.         seqNum:                    LONGINT;
  562.         msgHint:                LONGINT;                                {  for posting cache error,set this to 0 when report outq status  }
  563.         status:                    PMSAMStatus;
  564.     END;
  565.  
  566.     PMSAMLogErrorPBPtr = ^PMSAMLogErrorPB;
  567.     PMSAMLogErrorPB = RECORD
  568.         qLink:                    Ptr;
  569.         reservedH1:                LONGINT;
  570.         reservedH2:                LONGINT;
  571.         ioCompletion:            MSAMIOCompletionUPP;
  572.         ioResult:                OSErr;
  573.         saveA5:                    LONGINT;
  574.         reqCode:                INTEGER;
  575.         msamSlotID:                MSAMSlotID;                                {  0 for PMSAM errors  }
  576.         logEntry:                MailErrorLogEntryInfoPtr;
  577.         filler:                    ARRAY [0..1] OF LONGINT;
  578.     END;
  579.  
  580. {**************************************************************************************}
  581.  
  582. CONST
  583.     kMailMsgSummaryVersion        = 1;
  584.  
  585.  
  586. TYPE
  587.     MailMasterDataPtr = ^MailMasterData;
  588.     MailMasterData = RECORD
  589.         attrMask:                MailAttributeBitmap;                    {  indicates attributes present in MsgSummary  }
  590.         messageID:                MailLetterID;
  591.         replyID:                MailLetterID;
  592.         conversationID:            MailLetterID;
  593.     END;
  594.  
  595. { Values for addressedToMe in struct MailCoreData }
  596.  
  597. CONST
  598.     kAddressedAs_TO                = $01;
  599.     kAddressedAs_CC                = $02;
  600.     kAddressedAs_BCC            = $04;
  601.  
  602.  
  603. TYPE
  604.     MailCoreDataPtr = ^MailCoreData;
  605.     MailCoreData = RECORD
  606.         letterFlags:            MailLetterFlags;
  607.         messageSize:            UInt32;
  608.         letterIndications:        MailIndications;
  609.         messageType:            OCECreatorType;
  610.         sendTime:                MailTime;
  611.         messageFamily:            OSType;
  612.         reserved:                SInt8;
  613.         addressedToMe:            SInt8;
  614.         agentInfo:                PACKED ARRAY [0..5] OF CHAR;            {  6 bytes of special info [set to zero]  }
  615.                                                                         {  these are variable length and even padded  }
  616.         sender:                    RString32;                                {  recipient's entityName (trunc) }
  617.         subject:                RString32;                                {  subject maybe truncated  }
  618.     END;
  619.  
  620.     MSAMMsgSummaryPtr = ^MSAMMsgSummary;
  621.     MSAMMsgSummary = RECORD
  622.         version:                INTEGER;                                {  following flags are defaulted by Toolbox  }
  623.         msgDeleted:                BOOLEAN;                                {  true if msg is to be deleted by PMSAM  }
  624.         msgUpdated:                BOOLEAN;                                {  true if msgSummary was updated by MailManager  }
  625.         msgCached:                BOOLEAN;                                {  true if msg is in the slot's InQueue  }
  626.         padByte:                SInt8;
  627.         masterData:                MailMasterData;
  628.         coreData:                MailCoreData;
  629.     END;
  630.  
  631. { PMSAM can put up to 128 bytes of private msg summary data }
  632.  
  633. CONST
  634.     kMailMaxPMSAMMsgSummaryData    = 128;
  635.  
  636.  
  637. TYPE
  638.     PMSAMCreateMsgSummaryPBPtr = ^PMSAMCreateMsgSummaryPB;
  639.     PMSAMCreateMsgSummaryPB = RECORD
  640.         qLink:                    Ptr;
  641.         reservedH1:                LONGINT;
  642.         reservedH2:                LONGINT;
  643.         ioCompletion:            MSAMIOCompletionUPP;
  644.         ioResult:                OSErr;
  645.         saveA5:                    LONGINT;
  646.         reqCode:                INTEGER;
  647.         inQueueRef:                MSAMQueueRef;
  648.         seqNum:                    LONGINT;                                {  <- seq of the new message  }
  649.         msgSummary:                MSAMMsgSummaryPtr;                        {  attributes and mask filled in  }
  650.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be appended  }
  651.     END;
  652.  
  653.  
  654.     PMSAMPutMsgSummaryPBPtr = ^PMSAMPutMsgSummaryPB;
  655.     PMSAMPutMsgSummaryPB = RECORD
  656.         qLink:                    Ptr;
  657.         reservedH1:                LONGINT;
  658.         reservedH2:                LONGINT;
  659.         ioCompletion:            MSAMIOCompletionUPP;
  660.         ioResult:                OSErr;
  661.         saveA5:                    LONGINT;
  662.         reqCode:                INTEGER;
  663.         inQueueRef:                MSAMQueueRef;
  664.         seqNum:                    LONGINT;
  665.         letterFlags:            MailMaskedLetterFlagsPtr;                {  if not nil, then set msgStoreFlags  }
  666.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be overwritten  }
  667.     END;
  668.  
  669.     PMSAMGetMsgSummaryPBPtr = ^PMSAMGetMsgSummaryPB;
  670.     PMSAMGetMsgSummaryPB = RECORD
  671.         qLink:                    Ptr;
  672.         reservedH1:                LONGINT;
  673.         reservedH2:                LONGINT;
  674.         ioCompletion:            MSAMIOCompletionUPP;
  675.         ioResult:                OSErr;
  676.         saveA5:                    LONGINT;
  677.         reqCode:                INTEGER;
  678.         inQueueRef:                MSAMQueueRef;
  679.         seqNum:                    LONGINT;
  680.         msgSummary:                MSAMMsgSummaryPtr;                        {  if not nil, then read in the msgSummary  }
  681.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be read  }
  682.         msgSummaryOffset:        UInt16;                                    {  offset of PMSAM specific data from start of MsgSummary  }
  683.     END;
  684.  
  685. {**************************************************************************************}
  686. { Definitions for Server MSAMs }
  687. {************************************************************************************}
  688.     SMSAMAdminCode                        = UInt16;
  689. { Values of SMSAMAdminCode }
  690.  
  691. CONST
  692.     kSMSAMNotifyFwdrSetupChange    = 1;
  693.     kSMSAMNotifyFwdrNameChange    = 2;
  694.     kSMSAMNotifyFwdrPwdChange    = 3;
  695.     kSMSAMGetDynamicFwdrParams    = 4;
  696.  
  697.  
  698. TYPE
  699.     SMSAMSlotChanges                    = UInt32;
  700.  
  701. CONST
  702.     kSMSAMFwdrHomeInternetChangedBit = 0;
  703.     kSMSAMFwdrConnectedToChangedBit = 1;
  704.     kSMSAMFwdrForeignRLIsChangedBit = 2;
  705.     kSMSAMFwdrMnMServerChangedBit = 3;
  706.  
  707. { Values of SMSAMSlotChanges }
  708.     kSMSAMFwdrEverythingChangedMask = -1;
  709.     kSMSAMFwdrHomeInternetChangedMask = $00000001;
  710.     kSMSAMFwdrConnectedToChangedMask = $00000002;
  711.     kSMSAMFwdrForeignRLIsChangedMask = $00000004;
  712.     kSMSAMFwdrMnMServerChangedMask = $00000008;
  713.  
  714. { kSMSAMNotifyFwdrSetupChange }
  715.  
  716. TYPE
  717.     SMSAMSetupChangePtr = ^SMSAMSetupChange;
  718.     SMSAMSetupChange = RECORD
  719.         whatChanged:            SMSAMSlotChanges;                        {   --> bitmap of what parameters changed  }
  720.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  721.     END;
  722.  
  723. { kSMSAMNotifyFwdrNameChange }
  724.     SMSAMNameChangePtr = ^SMSAMNameChange;
  725.     SMSAMNameChange = RECORD
  726.         newName:                RString;                                {   --> msams new name  }
  727.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  728.     END;
  729.  
  730. { kSMSAMNotifyFwdrPasswordChange }
  731.     SMSAMPasswordChangePtr = ^SMSAMPasswordChange;
  732.     SMSAMPasswordChange = RECORD
  733.         newPassword:            RString;                                {   --> msams new password  }
  734.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  735.     END;
  736.  
  737. { kSMSAMGetDynamicFwdrParams }
  738.     SMSAMDynamicParamsPtr = ^SMSAMDynamicParams;
  739.     SMSAMDynamicParams = RECORD
  740.         curDiskUsed:            UInt32;                                    {  <--  amount of disk space used by msam  }
  741.         curMemoryUsed:            UInt32;                                    {  <--  amount of memory used by msam  }
  742.     END;
  743.  
  744.     SMSAMAdminEPPCRequestPtr = ^SMSAMAdminEPPCRequest;
  745.     SMSAMAdminEPPCRequest = RECORD
  746.         adminCode:                SMSAMAdminCode;
  747.         CASE INTEGER OF
  748.         0: (
  749.             setupChange:        SMSAMSetupChange;
  750.             );
  751.         1: (
  752.             nameChange:            SMSAMNameChange;
  753.             );
  754.         2: (
  755.             passwordChange:        SMSAMPasswordChange;
  756.             );
  757.         3: (
  758.             dynamicParams:        SMSAMDynamicParams;
  759.             );
  760.     END;
  761.  
  762.     SMSAMSetupPBPtr = ^SMSAMSetupPB;
  763.     SMSAMSetupPB = RECORD
  764.         qLink:                    Ptr;
  765.         reservedH1:                LONGINT;
  766.         reservedH2:                LONGINT;
  767.         ioCompletion:            MSAMIOCompletionUPP;
  768.         ioResult:                OSErr;
  769.         saveA5:                    LONGINT;
  770.         reqCode:                INTEGER;
  771.         serverMSAM:                RecordIDPtr;
  772.         password:                RStringPtr;
  773.         gatewayType:            OSType;
  774.         gatewayTypeDescription:    RStringPtr;
  775.         catalogServerHint:        AddrBlock;
  776.     END;
  777.  
  778.     SMSAMStartupPBPtr = ^SMSAMStartupPB;
  779.     SMSAMStartupPB = RECORD
  780.         qLink:                    Ptr;
  781.         reservedH1:                LONGINT;
  782.         reservedH2:                LONGINT;
  783.         ioCompletion:            MSAMIOCompletionUPP;
  784.         ioResult:                OSErr;
  785.         saveA5:                    LONGINT;
  786.         reqCode:                INTEGER;
  787.         msamIdentity:            AuthIdentity;
  788.         queueRef:                MSAMQueueRef;
  789.     END;
  790.  
  791.     SMSAMShutdownPBPtr = ^SMSAMShutdownPB;
  792.     SMSAMShutdownPB = RECORD
  793.         qLink:                    Ptr;
  794.         reservedH1:                LONGINT;
  795.         reservedH2:                LONGINT;
  796.         ioCompletion:            MSAMIOCompletionUPP;
  797.         ioResult:                OSErr;
  798.         saveA5:                    LONGINT;
  799.         reqCode:                INTEGER;
  800.         queueRef:                MSAMQueueRef;
  801.     END;
  802.  
  803. {**************************************************************************************}
  804. { Definitions for reading and writing MSAM Letters }
  805. {**************************************************************************************}
  806.     MSAMEnumeratePBPtr = ^MSAMEnumeratePB;
  807.     MSAMEnumeratePB = RECORD
  808.         qLink:                    Ptr;
  809.         reservedH1:                LONGINT;
  810.         reservedH2:                LONGINT;
  811.         ioCompletion:            MSAMIOCompletionUPP;
  812.         ioResult:                OSErr;
  813.         saveA5:                    LONGINT;
  814.         reqCode:                INTEGER;
  815.         queueRef:                MSAMQueueRef;
  816.         startSeqNum:            LONGINT;
  817.         nextSeqNum:                LONGINT;
  818.                                                                         {  buffer contains a Mail Reply. Each tuple is a MSAMEnumerateInQReply when enumerating the inQueue MSAMEnumerateOutQReply when enumerating the outQueue  }
  819.         buffer:                    MailBuffer;
  820.     END;
  821.  
  822.     MSAMEnumerateInQReplyPtr = ^MSAMEnumerateInQReply;
  823.     MSAMEnumerateInQReply = RECORD
  824.         seqNum:                    LONGINT;
  825.         msgDeleted:                BOOLEAN;                                {  true if msg is to be deleted by PMSAM  }
  826.         msgUpdated:                BOOLEAN;                                {  true if MsgSummary has been updated by TB  }
  827.         msgCached:                BOOLEAN;                                {  true if msg is in the incoming queue  }
  828.         padByte:                SInt8;
  829.     END;
  830.  
  831.     MSAMEnumerateOutQReplyPtr = ^MSAMEnumerateOutQReply;
  832.     MSAMEnumerateOutQReply = RECORD
  833.         seqNum:                    LONGINT;
  834.         done:                    BOOLEAN;                                {  true if all responsible recipients have been processed  }
  835.         priority:                SInt8;
  836.         msgFamily:                OSType;
  837.         approxSize:                LONGINT;
  838.         tunnelForm:                BOOLEAN;                                {  true if this letter has to be tunnelled  }
  839.         padByte:                SInt8;
  840.         nextHop:                NetworkSpec;                            {  valid if tunnelForm is true  }
  841.         msgType:                OCECreatorType;
  842.     END;
  843.  
  844.     MSAMDeletePBPtr = ^MSAMDeletePB;
  845.     MSAMDeletePB = RECORD
  846.         qLink:                    Ptr;
  847.         reservedH1:                LONGINT;
  848.         reservedH2:                LONGINT;
  849.         ioCompletion:            MSAMIOCompletionUPP;
  850.         ioResult:                OSErr;
  851.         saveA5:                    LONGINT;
  852.         reqCode:                INTEGER;
  853.         queueRef:                MSAMQueueRef;
  854.         seqNum:                    LONGINT;
  855.         msgOnly:                BOOLEAN;                                {  only valid for PMSAM & inQueue  }
  856.                                                                         {  set true to delete message but not msgSummary  }
  857.         padByte:                SInt8;
  858.                                                                         {  only valid for SMSAM & tunnelled messages  }
  859.         result:                    OSErr;
  860.     END;
  861.  
  862.     MSAMOpenPBPtr = ^MSAMOpenPB;
  863.     MSAMOpenPB = RECORD
  864.         qLink:                    Ptr;
  865.         reservedH1:                LONGINT;
  866.         reservedH2:                LONGINT;
  867.         ioCompletion:            MSAMIOCompletionUPP;
  868.         ioResult:                OSErr;
  869.         saveA5:                    LONGINT;
  870.         reqCode:                INTEGER;
  871.         queueRef:                MSAMQueueRef;
  872.         seqNum:                    LONGINT;
  873.         mailMsgRef:                MailMsgRef;
  874.     END;
  875.  
  876.     MSAMOpenNestedPBPtr = ^MSAMOpenNestedPB;
  877.     MSAMOpenNestedPB = RECORD
  878.         qLink:                    Ptr;
  879.         reservedH1:                LONGINT;
  880.         reservedH2:                LONGINT;
  881.         ioCompletion:            MSAMIOCompletionUPP;
  882.         ioResult:                OSErr;
  883.         saveA5:                    LONGINT;
  884.         reqCode:                INTEGER;
  885.         mailMsgRef:                MailMsgRef;
  886.         nestedRef:                MailMsgRef;
  887.     END;
  888.  
  889.     MSAMClosePBPtr = ^MSAMClosePB;
  890.     MSAMClosePB = RECORD
  891.         qLink:                    Ptr;
  892.         reservedH1:                LONGINT;
  893.         reservedH2:                LONGINT;
  894.         ioCompletion:            MSAMIOCompletionUPP;
  895.         ioResult:                OSErr;
  896.         saveA5:                    LONGINT;
  897.         reqCode:                INTEGER;
  898.         mailMsgRef:                MailMsgRef;
  899.     END;
  900.  
  901.     MSAMGetMsgHeaderPBPtr = ^MSAMGetMsgHeaderPB;
  902.     MSAMGetMsgHeaderPB = RECORD
  903.         qLink:                    Ptr;
  904.         reservedH1:                LONGINT;
  905.         reservedH2:                LONGINT;
  906.         ioCompletion:            MSAMIOCompletionUPP;
  907.         ioResult:                OSErr;
  908.         saveA5:                    LONGINT;
  909.         reqCode:                INTEGER;
  910.         mailMsgRef:                MailMsgRef;
  911.         selector:                SInt8;
  912.         filler1:                BOOLEAN;
  913.         offset:                    UInt32;
  914.         buffer:                    MailBuffer;
  915.         remaining:                UInt32;
  916.     END;
  917.  
  918. {    MSAMGetAttributesPB.buffer returned will contain the attribute values of 
  919.     the attributes indicated in responseMask, 
  920.     from the attribute indicated by the least significant bit set
  921.     to the attribute indicated by the most significant bit set.
  922.     Note that recipients - from, to, cc, bcc cannot be read using
  923.     this call. Use GetRecipients to read these. 
  924. }
  925.     MSAMGetAttributesPBPtr = ^MSAMGetAttributesPB;
  926.     MSAMGetAttributesPB = RECORD
  927.         qLink:                    Ptr;
  928.         reservedH1:                LONGINT;
  929.         reservedH2:                LONGINT;
  930.         ioCompletion:            MSAMIOCompletionUPP;
  931.         ioResult:                OSErr;
  932.         saveA5:                    LONGINT;
  933.         reqCode:                INTEGER;
  934.         mailMsgRef:                MailMsgRef;
  935.         requestMask:            MailAttributeBitmap;                    {  kMailIndicationsBit thru kMailSubjectBit  }
  936.         buffer:                    MailBuffer;
  937.         responseMask:            MailAttributeBitmap;
  938.         more:                    BOOLEAN;
  939.         filler1:                BOOLEAN;
  940.     END;
  941.  
  942. { attrID value to get resolved recipient list }
  943.  
  944. CONST
  945.     kMailResolvedList            = 0;
  946.  
  947.  
  948. TYPE
  949.     MailOriginalRecipientPtr = ^MailOriginalRecipient;
  950.     MailOriginalRecipient = RECORD
  951.         index:                    INTEGER;
  952.     END;
  953.  
  954. { Followed by OCEPackedRecipient }
  955.  
  956.  
  957.     MailResolvedRecipientPtr = ^MailResolvedRecipient;
  958.     MailResolvedRecipient = RECORD
  959.         index:                    INTEGER;
  960.         recipientFlags:            INTEGER;
  961.         responsible:            BOOLEAN;
  962.         padByte:                SInt8;
  963.     END;
  964.  
  965. { Followed by OCEPackedRecipient }
  966.  
  967.  
  968. {     MSAMGetRecipientsPB.buffer contains a Mail Reply. Each tuple is a
  969.     MailOriginalRecipient if getting original recipients 
  970.                             ie the attrID is kMail[From, To, Cc, Bcc]Bit
  971.     MailResolvedRecipient if getting resolved reicpients
  972.                             ie the attrID is kMailResolvedList
  973.     Both tuples are word alligned.  
  974. }
  975.     MSAMGetRecipientsPBPtr = ^MSAMGetRecipientsPB;
  976.     MSAMGetRecipientsPB = RECORD
  977.         qLink:                    Ptr;
  978.         reservedH1:                LONGINT;
  979.         reservedH2:                LONGINT;
  980.         ioCompletion:            MSAMIOCompletionUPP;
  981.         ioResult:                OSErr;
  982.         saveA5:                    LONGINT;
  983.         reqCode:                INTEGER;
  984.         mailMsgRef:                MailMsgRef;
  985.         attrID:                    MailAttributeID;                        {  kMailFromBit thru kMailBccBit  }
  986.         startIndex:                UInt16;                                    {  starts at 1  }
  987.         buffer:                    MailBuffer;
  988.         nextIndex:                UInt16;
  989.         more:                    BOOLEAN;
  990.         filler1:                BOOLEAN;
  991.     END;
  992.  
  993.     MSAMGetContentPBPtr = ^MSAMGetContentPB;
  994.     MSAMGetContentPB = RECORD
  995.         qLink:                    Ptr;
  996.         reservedH1:                LONGINT;
  997.         reservedH2:                LONGINT;
  998.         ioCompletion:            MSAMIOCompletionUPP;
  999.         ioResult:                OSErr;
  1000.         saveA5:                    LONGINT;
  1001.         reqCode:                INTEGER;
  1002.         mailMsgRef:                MailMsgRef;
  1003.         segmentMask:            MailSegmentMask;
  1004.         buffer:                    MailBuffer;
  1005.         textScrap:                StScrpRecPtr;
  1006.         script:                    ScriptCode;
  1007.         segmentType:            MailSegmentType;
  1008.         endOfScript:            BOOLEAN;
  1009.         endOfSegment:            BOOLEAN;
  1010.         endOfContent:            BOOLEAN;
  1011.         filler1:                BOOLEAN;
  1012.         segmentLength:            LONGINT;                                {  NEW: <-  valid first call in a segment  }
  1013.         segmentID:                LONGINT;                                {  NEW: <-> identifier for this segment  }
  1014.     END;
  1015.  
  1016.     MSAMGetEnclosurePBPtr = ^MSAMGetEnclosurePB;
  1017.     MSAMGetEnclosurePB = RECORD
  1018.         qLink:                    Ptr;
  1019.         reservedH1:                LONGINT;
  1020.         reservedH2:                LONGINT;
  1021.         ioCompletion:            MSAMIOCompletionUPP;
  1022.         ioResult:                OSErr;
  1023.         saveA5:                    LONGINT;
  1024.         reqCode:                INTEGER;
  1025.         mailMsgRef:                MailMsgRef;
  1026.         contentEnclosure:        BOOLEAN;
  1027.         padByte:                SInt8;
  1028.         buffer:                    MailBuffer;
  1029.         endOfFile:                BOOLEAN;
  1030.         endOfEnclosures:        BOOLEAN;
  1031.     END;
  1032.  
  1033.     MailBlockInfoPtr = ^MailBlockInfo;
  1034.     MailBlockInfo = RECORD
  1035.         blockType:                OCECreatorType;
  1036.         offset:                    UInt32;
  1037.         blockLength:            UInt32;
  1038.     END;
  1039.  
  1040.     MSAMEnumerateBlocksPBPtr = ^MSAMEnumerateBlocksPB;
  1041.     MSAMEnumerateBlocksPB = RECORD
  1042.         qLink:                    Ptr;
  1043.         reservedH1:                LONGINT;
  1044.         reservedH2:                LONGINT;
  1045.         ioCompletion:            MSAMIOCompletionUPP;
  1046.         ioResult:                OSErr;
  1047.         saveA5:                    LONGINT;
  1048.         reqCode:                INTEGER;
  1049.         mailMsgRef:                MailMsgRef;
  1050.         startIndex:                UInt16;                                    {  starts at 1  }
  1051.         buffer:                    MailBuffer;
  1052.                                                                         {      buffer contains a Mail Reply. Each tuple is a MailBlockInfo  }
  1053.         nextIndex:                UInt16;
  1054.         more:                    BOOLEAN;
  1055.         filler1:                BOOLEAN;
  1056.     END;
  1057.  
  1058.     MSAMGetBlockPBPtr = ^MSAMGetBlockPB;
  1059.     MSAMGetBlockPB = RECORD
  1060.         qLink:                    Ptr;
  1061.         reservedH1:                LONGINT;
  1062.         reservedH2:                LONGINT;
  1063.         ioCompletion:            MSAMIOCompletionUPP;
  1064.         ioResult:                OSErr;
  1065.         saveA5:                    LONGINT;
  1066.         reqCode:                INTEGER;
  1067.         mailMsgRef:                MailMsgRef;
  1068.         blockType:                OCECreatorType;
  1069.         blockIndex:                UInt16;
  1070.         buffer:                    MailBuffer;
  1071.         dataOffset:                UInt32;
  1072.         endOfBlock:                BOOLEAN;
  1073.         padByte:                SInt8;
  1074.         remaining:                UInt32;
  1075.     END;
  1076.  
  1077. { YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1078.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1079.  * REASONS.
  1080. }
  1081. { not valid for tunnel form letters }
  1082.     MSAMMarkRecipientsPBPtr = ^MSAMMarkRecipientsPB;
  1083.     MSAMMarkRecipientsPB = RECORD
  1084.         qLink:                    Ptr;
  1085.         reservedH1:                LONGINT;
  1086.         reservedH2:                LONGINT;
  1087.         ioCompletion:            MSAMIOCompletionUPP;
  1088.         ioResult:                OSErr;
  1089.         saveA5:                    LONGINT;
  1090.         reqCode:                INTEGER;
  1091.         queueRef:                MSAMQueueRef;
  1092.         seqNum:                    LONGINT;
  1093.         buffer:                    MailBuffer;                                {      buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked.  }
  1094.     END;
  1095.  
  1096.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1097.  * queueRef, seqNum 
  1098. }
  1099. { not valid for tunnel form letters }
  1100.     MSAMnMarkRecipientsPBPtr = ^MSAMnMarkRecipientsPB;
  1101.     MSAMnMarkRecipientsPB = RECORD
  1102.         qLink:                    Ptr;
  1103.         reservedH1:                LONGINT;
  1104.         reservedH2:                LONGINT;
  1105.         ioCompletion:            MSAMIOCompletionUPP;
  1106.         ioResult:                OSErr;
  1107.         saveA5:                    LONGINT;
  1108.         reqCode:                INTEGER;
  1109.         mailMsgRef:                MailMsgRef;
  1110.         buffer:                    MailBuffer;                                {      buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked.  }
  1111.     END;
  1112.  
  1113. {**************************************************************************************}
  1114.     MSAMCreatePBPtr = ^MSAMCreatePB;
  1115.     MSAMCreatePB = RECORD
  1116.         qLink:                    Ptr;
  1117.         reservedH1:                LONGINT;
  1118.         reservedH2:                LONGINT;
  1119.         ioCompletion:            MSAMIOCompletionUPP;
  1120.         ioResult:                OSErr;
  1121.         saveA5:                    LONGINT;
  1122.         reqCode:                INTEGER;
  1123.         queueRef:                MSAMQueueRef;
  1124.         asLetter:                BOOLEAN;                                {  indicate if we should create as letter or msg  }
  1125.         filler1:                BOOLEAN;
  1126.         msgType:                IPMMsgType;                                {  up to application discretion: must be of IPMSenderTag  kIPMOSFormatType for asLetter=true  }
  1127.         refCon:                    LONGINT;                                {  for messages only  }
  1128.         seqNum:                    LONGINT;                                {  set if creating message in the inQueue  }
  1129.         tunnelForm:                BOOLEAN;                                {  if true tunnelForm else newForm  }
  1130.         bccRecipients:            BOOLEAN;                                {  true if creating letter with bcc recipients  }
  1131.         newRef:                    MailMsgRef;
  1132.     END;
  1133.  
  1134.     MSAMBeginNestedPBPtr = ^MSAMBeginNestedPB;
  1135.     MSAMBeginNestedPB = RECORD
  1136.         qLink:                    Ptr;
  1137.         reservedH1:                LONGINT;
  1138.         reservedH2:                LONGINT;
  1139.         ioCompletion:            MSAMIOCompletionUPP;
  1140.         ioResult:                OSErr;
  1141.         saveA5:                    LONGINT;
  1142.         reqCode:                INTEGER;
  1143.         mailMsgRef:                MailMsgRef;
  1144.         refCon:                    LONGINT;                                {  for messages only  }
  1145.         msgType:                IPMMsgType;
  1146.     END;
  1147.  
  1148.     MSAMEndNestedPBPtr = ^MSAMEndNestedPB;
  1149.     MSAMEndNestedPB = RECORD
  1150.         qLink:                    Ptr;
  1151.         reservedH1:                LONGINT;
  1152.         reservedH2:                LONGINT;
  1153.         ioCompletion:            MSAMIOCompletionUPP;
  1154.         ioResult:                OSErr;
  1155.         saveA5:                    LONGINT;
  1156.         reqCode:                INTEGER;
  1157.         mailMsgRef:                MailMsgRef;
  1158.     END;
  1159.  
  1160.     MSAMSubmitPBPtr = ^MSAMSubmitPB;
  1161.     MSAMSubmitPB = RECORD
  1162.         qLink:                    Ptr;
  1163.         reservedH1:                LONGINT;
  1164.         reservedH2:                LONGINT;
  1165.         ioCompletion:            MSAMIOCompletionUPP;
  1166.         ioResult:                OSErr;
  1167.         saveA5:                    LONGINT;
  1168.         reqCode:                INTEGER;
  1169.         mailMsgRef:                MailMsgRef;
  1170.         submitFlag:                BOOLEAN;
  1171.         padByte:                SInt8;
  1172.         msgID:                    MailLetterID;
  1173.     END;
  1174.  
  1175.     MSAMPutMsgHeaderPBPtr = ^MSAMPutMsgHeaderPB;
  1176.     MSAMPutMsgHeaderPB = RECORD
  1177.         qLink:                    Ptr;
  1178.         reservedH1:                LONGINT;
  1179.         reservedH2:                LONGINT;
  1180.         ioCompletion:            MSAMIOCompletionUPP;
  1181.         ioResult:                OSErr;
  1182.         saveA5:                    LONGINT;
  1183.         reqCode:                INTEGER;
  1184.         mailMsgRef:                MailMsgRef;
  1185.         replyQueue:                OCERecipientPtr;
  1186.         sender:                    IPMSenderPtr;
  1187.         deliveryNotification:    SInt8;
  1188.         priority:                SInt8;
  1189.     END;
  1190.  
  1191.     MSAMPutAttributePBPtr = ^MSAMPutAttributePB;
  1192.     MSAMPutAttributePB = RECORD
  1193.         qLink:                    Ptr;
  1194.         reservedH1:                LONGINT;
  1195.         reservedH2:                LONGINT;
  1196.         ioCompletion:            MSAMIOCompletionUPP;
  1197.         ioResult:                OSErr;
  1198.         saveA5:                    LONGINT;
  1199.         reqCode:                INTEGER;
  1200.         mailMsgRef:                MailMsgRef;
  1201.         attrID:                    MailAttributeID;                        {  kMailIndicationsBit thru kMailSubjectBit  }
  1202.         buffer:                    MailBuffer;
  1203.     END;
  1204.  
  1205.     MSAMPutRecipientPBPtr = ^MSAMPutRecipientPB;
  1206.     MSAMPutRecipientPB = RECORD
  1207.         qLink:                    Ptr;
  1208.         reservedH1:                LONGINT;
  1209.         reservedH2:                LONGINT;
  1210.         ioCompletion:            MSAMIOCompletionUPP;
  1211.         ioResult:                OSErr;
  1212.         saveA5:                    LONGINT;
  1213.         reqCode:                INTEGER;
  1214.         mailMsgRef:                MailMsgRef;
  1215.         attrID:                    MailAttributeID;                        {  kMailFromBit thru kMailBccBit  }
  1216.         recipient:                MailRecipientPtr;
  1217.         responsible:            BOOLEAN;                                {  valid for server and message msams only  }
  1218.         filler1:                BOOLEAN;
  1219.     END;
  1220.  
  1221.     MSAMPutContentPBPtr = ^MSAMPutContentPB;
  1222.     MSAMPutContentPB = RECORD
  1223.         qLink:                    Ptr;
  1224.         reservedH1:                LONGINT;
  1225.         reservedH2:                LONGINT;
  1226.         ioCompletion:            MSAMIOCompletionUPP;
  1227.         ioResult:                OSErr;
  1228.         saveA5:                    LONGINT;
  1229.         reqCode:                INTEGER;
  1230.         mailMsgRef:                MailMsgRef;
  1231.         segmentType:            MailSegmentType;
  1232.         append:                    BOOLEAN;
  1233.         padByte:                SInt8;
  1234.         buffer:                    MailBuffer;
  1235.         textScrap:                StScrpRecPtr;
  1236.         startNewScript:            BOOLEAN;
  1237.         filler1:                BOOLEAN;
  1238.         script:                    ScriptCode;                                {  valid only if startNewScript is true  }
  1239.     END;
  1240.  
  1241.     MSAMPutEnclosurePBPtr = ^MSAMPutEnclosurePB;
  1242.     MSAMPutEnclosurePB = RECORD
  1243.         qLink:                    Ptr;
  1244.         reservedH1:                LONGINT;
  1245.         reservedH2:                LONGINT;
  1246.         ioCompletion:            MSAMIOCompletionUPP;
  1247.         ioResult:                OSErr;
  1248.         saveA5:                    LONGINT;
  1249.         reqCode:                INTEGER;
  1250.         mailMsgRef:                MailMsgRef;
  1251.         contentEnclosure:        BOOLEAN;
  1252.         padByte:                SInt8;
  1253.         hfs:                    BOOLEAN;                                {  true => in file system, false => in memory  }
  1254.         append:                    BOOLEAN;
  1255.         buffer:                    MailBuffer;                                {  Unused if hfs == true  }
  1256.         enclosure:                FSSpec;
  1257.         addlInfo:                MailEnclosureInfo;
  1258.     END;
  1259.  
  1260.     MSAMPutBlockPBPtr = ^MSAMPutBlockPB;
  1261.     MSAMPutBlockPB = RECORD
  1262.         qLink:                    Ptr;
  1263.         reservedH1:                LONGINT;
  1264.         reservedH2:                LONGINT;
  1265.         ioCompletion:            MSAMIOCompletionUPP;
  1266.         ioResult:                OSErr;
  1267.         saveA5:                    LONGINT;
  1268.         reqCode:                INTEGER;
  1269.         mailMsgRef:                MailMsgRef;
  1270.         refCon:                    LONGINT;                                {  for messages only  }
  1271.         blockType:                OCECreatorType;
  1272.         append:                    BOOLEAN;
  1273.         filler1:                BOOLEAN;
  1274.         buffer:                    MailBuffer;
  1275.         mode:                    MailBlockMode;                            {  if blockType is kMailTunnelLtrType or kMailHopInfoType  mode is assumed to be kMailFromMark  }
  1276.         offset:                    UInt32;
  1277.     END;
  1278.  
  1279. {**************************************************************************************}
  1280.     MSAMCreateReportPBPtr = ^MSAMCreateReportPB;
  1281.     MSAMCreateReportPB = RECORD
  1282.         qLink:                    Ptr;
  1283.         reservedH1:                LONGINT;
  1284.         reservedH2:                LONGINT;
  1285.         ioCompletion:            MSAMIOCompletionUPP;
  1286.         ioResult:                OSErr;
  1287.         saveA5:                    LONGINT;
  1288.         reqCode:                INTEGER;
  1289.         queueRef:                MSAMQueueRef;                            {  to distinguish personal and server MSAMs  }
  1290.         mailMsgRef:                MailMsgRef;
  1291.         msgID:                    MailLetterID;                            {  kMailLetterIDBit of letter being reported upon  }
  1292.         sender:                    MailRecipientPtr;                        {  sender of the letter you are creating report on  }
  1293.     END;
  1294.  
  1295.     MSAMPutRecipientReportPBPtr = ^MSAMPutRecipientReportPB;
  1296.     MSAMPutRecipientReportPB = RECORD
  1297.         qLink:                    Ptr;
  1298.         reservedH1:                LONGINT;
  1299.         reservedH2:                LONGINT;
  1300.         ioCompletion:            MSAMIOCompletionUPP;
  1301.         ioResult:                OSErr;
  1302.         saveA5:                    LONGINT;
  1303.         reqCode:                INTEGER;
  1304.         mailMsgRef:                MailMsgRef;
  1305.         recipientIndex:            INTEGER;                                {  recipient index in the original letter  }
  1306.         result:                    OSErr;                                    {  result of sending the recipient  }
  1307.     END;
  1308.  
  1309. {**************************************************************************************}
  1310.     MailWakeupPMSAMPBPtr = ^MailWakeupPMSAMPB;
  1311.     MailWakeupPMSAMPB = RECORD
  1312.         qLink:                    Ptr;
  1313.         reservedH1:                LONGINT;
  1314.         reservedH2:                LONGINT;
  1315.         ioCompletion:            MSAMIOCompletionUPP;
  1316.         ioResult:                OSErr;
  1317.         saveA5:                    LONGINT;
  1318.         reqCode:                INTEGER;
  1319.         pmsamCID:                CreationID;
  1320.         mailSlotID:                MailSlotID;
  1321.     END;
  1322.  
  1323.     MailCreateMailSlotPBPtr = ^MailCreateMailSlotPB;
  1324.     MailCreateMailSlotPB = RECORD
  1325.         qLink:                    Ptr;
  1326.         reservedH1:                LONGINT;
  1327.         reservedH2:                LONGINT;
  1328.         ioCompletion:            MSAMIOCompletionUPP;
  1329.         ioResult:                OSErr;
  1330.         saveA5:                    LONGINT;
  1331.         reqCode:                INTEGER;
  1332.         mailboxRef:                MailboxRef;
  1333.         timeout:                LONGINT;
  1334.         pmsamCID:                CreationID;
  1335.         smca:                    SMCA;
  1336.     END;
  1337.  
  1338.     MailModifyMailSlotPBPtr = ^MailModifyMailSlotPB;
  1339.     MailModifyMailSlotPB = RECORD
  1340.         qLink:                    Ptr;
  1341.         reservedH1:                LONGINT;
  1342.         reservedH2:                LONGINT;
  1343.         ioCompletion:            MSAMIOCompletionUPP;
  1344.         ioResult:                OSErr;
  1345.         saveA5:                    LONGINT;
  1346.         reqCode:                INTEGER;
  1347.         mailboxRef:                MailboxRef;
  1348.         timeout:                LONGINT;
  1349.         pmsamCID:                CreationID;
  1350.         smca:                    SMCA;
  1351.     END;
  1352.  
  1353.     MSAMParamPtr = ^MSAMParam;
  1354.     MSAMParam = RECORD
  1355.         CASE INTEGER OF
  1356.         0: (
  1357.             qLink:                Ptr;
  1358.             reservedH1:            LONGINT;
  1359.             reservedH2:            LONGINT;
  1360.             ioCompletion:        MSAMIOCompletionUPP;
  1361.             ioResult:            OSErr;
  1362.             saveA5:                LONGINT;
  1363.             reqCode:            INTEGER;
  1364.            );
  1365.         1: (
  1366.             pmsamGetMSAMRecord:    PMSAMGetMSAMRecordPB;
  1367.             );
  1368.         2: (
  1369.             pmsamOpenQueues:    PMSAMOpenQueuesPB;
  1370.             );
  1371.         3: (
  1372.             pmsamSetStatus:        PMSAMSetStatusPB;
  1373.             );
  1374.         4: (
  1375.             pmsamLogError:        PMSAMLogErrorPB;
  1376.             );
  1377.         5: (
  1378.             smsamSetup:            SMSAMSetupPB;
  1379.             );
  1380.         6: (
  1381.             smsamStartup:        SMSAMStartupPB;
  1382.             );
  1383.         7: (
  1384.             smsamShutdown:        SMSAMShutdownPB;
  1385.             );
  1386.         8: (
  1387.             msamEnumerate:        MSAMEnumeratePB;
  1388.             );
  1389.         9: (
  1390.             msamDelete:            MSAMDeletePB;
  1391.             );
  1392.         10: (
  1393.             msamOpen:            MSAMOpenPB;
  1394.             );
  1395.         11: (
  1396.             msamOpenNested:        MSAMOpenNestedPB;
  1397.             );
  1398.         12: (
  1399.             msamClose:            MSAMClosePB;
  1400.             );
  1401.         13: (
  1402.             msamGetMsgHeader:    MSAMGetMsgHeaderPB;
  1403.             );
  1404.         14: (
  1405.             msamGetAttributes:    MSAMGetAttributesPB;
  1406.             );
  1407.         15: (
  1408.             msamGetRecipients:    MSAMGetRecipientsPB;
  1409.             );
  1410.         16: (
  1411.             msamGetContent:        MSAMGetContentPB;
  1412.             );
  1413.         17: (
  1414.             msamGetEnclosure:    MSAMGetEnclosurePB;
  1415.             );
  1416.         18: (
  1417.             msamEnumerateBlocks: MSAMEnumerateBlocksPB;
  1418.             );
  1419.         19: (
  1420.             msamGetBlock:        MSAMGetBlockPB;
  1421.             );
  1422.         20: (
  1423.             msamMarkRecipients:    MSAMMarkRecipientsPB;
  1424.             );
  1425.         21: (
  1426.             msamnMarkRecipients: MSAMnMarkRecipientsPB;
  1427.             );
  1428.         22: (
  1429.             msamCreate:            MSAMCreatePB;
  1430.             );
  1431.         23: (
  1432.             msamBeginNested:    MSAMBeginNestedPB;
  1433.             );
  1434.         24: (
  1435.             msamEndNested:        MSAMEndNestedPB;
  1436.             );
  1437.         25: (
  1438.             msamSubmit:            MSAMSubmitPB;
  1439.             );
  1440.         26: (
  1441.             msamPutMsgHeader:    MSAMPutMsgHeaderPB;
  1442.             );
  1443.         27: (
  1444.             msamPutAttribute:    MSAMPutAttributePB;
  1445.             );
  1446.         28: (
  1447.             msamPutRecipient:    MSAMPutRecipientPB;
  1448.             );
  1449.         29: (
  1450.             msamPutContent:        MSAMPutContentPB;
  1451.             );
  1452.         30: (
  1453.             msamPutEnclosure:    MSAMPutEnclosurePB;                        {  this field is SYSTEM8_DEPRECATED }
  1454.             );
  1455.         31: (
  1456.             msamPutBlock:        MSAMPutBlockPB;
  1457.             );
  1458.         32: (
  1459.             msamCreateReport:    MSAMCreateReportPB;                        {  Reports and Error Handling Calls  }
  1460.             );
  1461.         33: (
  1462.             msamPutRecipientReport: MSAMPutRecipientReportPB;
  1463.             );
  1464.         34: (
  1465.             pmsamCreateMsgSummary: PMSAMCreateMsgSummaryPB;
  1466.             );
  1467.         35: (
  1468.             pmsamPutMsgSummary:    PMSAMPutMsgSummaryPB;
  1469.             );
  1470.         36: (
  1471.             pmsamGetMsgSummary:    PMSAMGetMsgSummaryPB;
  1472.             );
  1473.         37: (
  1474.             wakeupPMSAM:        MailWakeupPMSAMPB;
  1475.             );
  1476.         38: (
  1477.             createMailSlot:        MailCreateMailSlotPB;
  1478.             );
  1479.         39: (
  1480.             modifyMailSlot:        MailModifyMailSlotPB;
  1481.             );
  1482.     END;
  1483.  
  1484. TempMSAMParam    =    MSAMParam;
  1485.  
  1486. CONST
  1487.     uppMSAMIOCompletionProcInfo = $00009802;
  1488.  
  1489. PROCEDURE CallMSAMIOCompletionProc(VAR paramBlock: TempMSAMParam; userRoutine: MSAMIOCompletionUPP);
  1490.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1491.     {To be implemented:  Glue to move parameters into registers.}
  1492.     {$ENDC}
  1493.  
  1494. FUNCTION NewMSAMIOCompletionProc(userRoutine: MSAMIOCompletionProcPtr): MSAMIOCompletionUPP;
  1495.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1496.     INLINE $2E9F;
  1497.     {$ENDC}
  1498. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1499. FUNCTION MailCreateMailSlot(VAR paramBlock: MSAMParam): OSErr;
  1500.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1501.     INLINE $7001, $1F00, $3F3C, $052B, $AA5E;
  1502.     {$ENDC}
  1503. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1504. FUNCTION MailModifyMailSlot(VAR paramBlock: MSAMParam): OSErr;
  1505.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1506.     INLINE $7001, $1F00, $3F3C, $052C, $AA5E;
  1507.     {$ENDC}
  1508. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1509. FUNCTION MailWakeupPMSAM(VAR paramBlock: MSAMParam): OSErr;
  1510.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1511.     INLINE $7001, $1F00, $3F3C, $0507, $AA5E;
  1512.     {$ENDC}
  1513. { Personal MSAM Glue Routines }
  1514. FUNCTION PMSAMOpenQueues(VAR paramBlock: MSAMParam): OSErr;
  1515.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1516.     INLINE $7000, $1F00, $3F3C, $0500, $AA5E;
  1517.     {$ENDC}
  1518. FUNCTION PMSAMSetStatus(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1519.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1520.     INLINE $3F3C, $0527, $AA5E;
  1521.     {$ENDC}
  1522. { SYNC ONLY }
  1523. FUNCTION PMSAMGetMSAMRecord(VAR paramBlock: MSAMParam): OSErr;
  1524.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1525.     INLINE $7000, $1F00, $3F3C, $0506, $AA5E;
  1526.     {$ENDC}
  1527. { Server MSAM Glue Routines }
  1528. { SYNC ONLY }
  1529. FUNCTION SMSAMSetup(VAR paramBlock: MSAMParam): OSErr;
  1530.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1531.     INLINE $7000, $1F00, $3F3C, $0523, $AA5E;
  1532.     {$ENDC}
  1533. { SYNC ONLY }
  1534. FUNCTION SMSAMStartup(VAR paramBlock: MSAMParam): OSErr;
  1535.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1536.     INLINE $7000, $1F00, $3F3C, $0501, $AA5E;
  1537.     {$ENDC}
  1538. FUNCTION SMSAMShutdown(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1539.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1540.     INLINE $3F3C, $0502, $AA5E;
  1541.     {$ENDC}
  1542. { Get Interface Glue Routines }
  1543. FUNCTION MSAMEnumerate(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1544.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1545.     INLINE $3F3C, $0503, $AA5E;
  1546.     {$ENDC}
  1547. FUNCTION MSAMDelete(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1548.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1549.     INLINE $3F3C, $0504, $AA5E;
  1550.     {$ENDC}
  1551. FUNCTION MSAMMarkRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1552.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1553.     INLINE $3F3C, $0505, $AA5E;
  1554.     {$ENDC}
  1555. FUNCTION MSAMnMarkRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1556.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1557.     INLINE $3F3C, $0512, $AA5E;
  1558.     {$ENDC}
  1559. FUNCTION MSAMOpen(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1560.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1561.     INLINE $3F3C, $0508, $AA5E;
  1562.     {$ENDC}
  1563. FUNCTION MSAMOpenNested(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1564.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1565.     INLINE $3F3C, $0509, $AA5E;
  1566.     {$ENDC}
  1567. FUNCTION MSAMClose(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1568.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1569.     INLINE $3F3C, $050A, $AA5E;
  1570.     {$ENDC}
  1571. FUNCTION MSAMGetRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1572.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1573.     INLINE $3F3C, $050C, $AA5E;
  1574.     {$ENDC}
  1575. FUNCTION MSAMGetAttributes(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1576.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1577.     INLINE $3F3C, $050B, $AA5E;
  1578.     {$ENDC}
  1579. FUNCTION MSAMGetContent(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1580.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1581.     INLINE $3F3C, $050D, $AA5E;
  1582.     {$ENDC}
  1583. FUNCTION MSAMGetEnclosure(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1584.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1585.     INLINE $3F3C, $050E, $AA5E;
  1586.     {$ENDC}
  1587. FUNCTION MSAMEnumerateBlocks(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1588.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1589.     INLINE $3F3C, $050F, $AA5E;
  1590.     {$ENDC}
  1591. FUNCTION MSAMGetBlock(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1592.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1593.     INLINE $3F3C, $0510, $AA5E;
  1594.     {$ENDC}
  1595. FUNCTION MSAMGetMsgHeader(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1596.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1597.     INLINE $3F3C, $0511, $AA5E;
  1598.     {$ENDC}
  1599. { Put Interface Glue Routines }
  1600. FUNCTION MSAMCreate(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1601.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1602.     INLINE $3F3C, $0514, $AA5E;
  1603.     {$ENDC}
  1604. FUNCTION MSAMBeginNested(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1605.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1606.     INLINE $3F3C, $0515, $AA5E;
  1607.     {$ENDC}
  1608. FUNCTION MSAMEndNested(VAR paramBlock: MSAMParam): OSErr;
  1609.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1610.     INLINE $7000, $1F00, $3F3C, $0516, $AA5E;
  1611.     {$ENDC}
  1612. {  SYNCHRONOUS ONLY }
  1613. FUNCTION MSAMSubmit(VAR paramBlock: MSAMParam): OSErr;
  1614.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1615.     INLINE $7000, $1F00, $3F3C, $0517, $AA5E;
  1616.     {$ENDC}
  1617. FUNCTION MSAMPutAttribute(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1618.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1619.     INLINE $3F3C, $0518, $AA5E;
  1620.     {$ENDC}
  1621. FUNCTION MSAMPutRecipient(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1622.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1623.     INLINE $3F3C, $0519, $AA5E;
  1624.     {$ENDC}
  1625. FUNCTION MSAMPutContent(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1626.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1627.     INLINE $3F3C, $051A, $AA5E;
  1628.     {$ENDC}
  1629. {  SYNCHRONOUS ONLY }
  1630. FUNCTION MSAMPutEnclosure(VAR paramBlock: MSAMParam): OSErr;
  1631.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1632.     INLINE $7000, $1F00, $3F3C, $051B, $AA5E;
  1633.     {$ENDC}
  1634. FUNCTION MSAMPutBlock(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1635.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1636.     INLINE $3F3C, $051C, $AA5E;
  1637.     {$ENDC}
  1638. FUNCTION MSAMPutMsgHeader(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1639.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1640.     INLINE $3F3C, $051D, $AA5E;
  1641.     {$ENDC}
  1642. { Reports and Error Handling Glue Routines }
  1643. FUNCTION MSAMCreateReport(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1644.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1645.     INLINE $3F3C, $051F, $AA5E;
  1646.     {$ENDC}
  1647. FUNCTION MSAMPutRecipientReport(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1648.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1649.     INLINE $3F3C, $0520, $AA5E;
  1650.     {$ENDC}
  1651. FUNCTION PMSAMLogError(VAR paramBlock: MSAMParam): OSErr;
  1652.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1653.     INLINE $7000, $1F00, $3F3C, $0521, $AA5E;
  1654.     {$ENDC}
  1655. { MsgSummary Glue Routines }
  1656. FUNCTION PMSAMCreateMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1657.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1658.     INLINE $3F3C, $0522, $AA5E;
  1659.     {$ENDC}
  1660. FUNCTION PMSAMPutMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1661.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1662.     INLINE $3F3C, $0525, $AA5E;
  1663.     {$ENDC}
  1664. FUNCTION PMSAMGetMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1665.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1666.     INLINE $3F3C, $0526, $AA5E;
  1667.     {$ENDC}
  1668.  
  1669. {$ALIGN RESET}
  1670. {$POP}
  1671.  
  1672. {$SETC UsingIncludes := OCEMailIncludes}
  1673.  
  1674. {$ENDC} {__OCEMAIL__}
  1675.  
  1676. {$IFC NOT UsingIncludes}
  1677.  END.
  1678. {$ENDC}
  1679.